package com.csdj.thread;

import java.util.concurrent.TimeUnit;

public class RunThread implements Runnable{
    private  int length = 1000;
    @Override
    public void run() {
        synchronized (this){
            for(int i = 0;i<10;i++){
                try {
                    TimeUnit.MILLISECONDS.sleep(500);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                System.out.println(Thread.currentThread().getName()+"跑了"+i*10+"米");
            }
        }
    }


}
